package org.example.spirngmvcdemo.service;

import org.example.spirngmvcdemo.mapper.MessageMapper;
import org.example.spirngmvcdemo.model.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.List;

@Service
public class MessageService {
    @Autowired
    private MessageMapper messageMapper;

    public Integer insert(Message message) {
      return messageMapper.insert(message);
    }

    public List<Message> queryMessage(){
        return messageMapper.queryMessage();
    }
}
